package com.xg.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xg.common.request.OrderItemDTO;
import com.xg.entity.UsedCarImage;
import com.xg.vo.UsedCarVO;
import com.xg.entity.UsedCar;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jdh
 * @since 2023-03-30
 */
@Mapper
public interface UsedCarMapper extends BaseMapper<UsedCar> {

    UsedCarVO findCarList(@Param("usedCarId") Integer usedCarId);

    List<UsedCar> queryUsedCarList(@Param("usedCar") UsedCar usedCar);

    List<UsedCar> queryUsedCarSearchList(UsedCar usedCar);

    IPage<List<UsedCar>> queryUsedCarSearchListCopy(@Param("page") IPage<UsedCar> pageUtil,@Param("params") Map<String, Object> params);

    OrderItemDTO getCarByCarId(@Param("carId") Long carId);

    List<UsedCar> queryUsedCarListWithImages();

    List<UsedCar> queryUsedCarSearchListNewCopy(@Param("params") Map<String, Object> params);

    UsedCar selectUsedCarInfo(Integer usedCarId);

    List<UsedCarImage> queryImageList(@Param("carId") Long carId);

    List<UsedCar> queryImagesWithStatus();

    List<UsedCar> queryImagesWithEnergy();

    List<UsedCar> queryImagesWithType();

    List<UsedCar> queryCarList(@Param("usedCarId") Integer usedCarId);

    void updateUsedCar(int carId);

    int auditUsedCar(@Param("ids")List<Integer> ids,@Param("auditStatus")Integer auditStatus);
}

